﻿using EkStudio.com.bean.xml.reflection;
using EkStudio.com.bean.xml.RootInterface;
using System;

namespace EkStudio.com.bean.xml.WorkFlow.Node
{
    /// <summary>
    /// 超时设定
    /// </summary>
    public class WflowNodeItemATimeOut : BillObjectInterface
    {


        private bool enable = false;
        private string operation = "StNone";
        private int defaultTime = 0;

        private WflowMessageElement message = null;

        [Xml]
        public bool Enable
        {
            get { return enable; }
            set { enable = value; }
        }
        [Xml]
        public string Operation
        {
            get { return operation; }
            set { operation = value; }
        }
        [Xml]
        public int DefaultTime
        {
            get { return defaultTime; }
            set { defaultTime = value; }
        }
        [XmlElement]
        public WflowMessageElement Message
        {
            get { return message; }
            set { message = value; }
        }

        [XmlTransient]
        public object ParentBean
        {
            get
            {
                throw new NotImplementedException();
            }

            set
            {
                throw new NotImplementedException();
            }
        }

        public object Clone()
        {
            WflowNodeItemATimeOut clone = new WflowNodeItemATimeOut();
            clone.Enable = enable;
            clone.Operation = operation;
            clone.DefaultTime = defaultTime;
            if (message != null) clone.Message = message.Clone() as WflowMessageElement;
            return clone;
        }
    }
}
